home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 24 / CU Amiga Magazine's Super CD-ROM 24 (1998)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1998-07].iso / CUCD / Programming / SWI / source / src / pl-save.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-02  |  1.0 KB  |  35 lines

  1. /*  $Id: pl-save.h,v 1.6 1994/03/02 14:33:26 jan Exp $
  2.  
  3.     Copyright (c) 1991 Jan Wielemaker. All rights reserved.
  4.     jan@swi.psy.uva.nl
  5.  
  6.     Purpose: pl-save.c exports
  7. */
  8.  
  9. #define S_DATA        1    /* Data section */
  10. #define S_TEXT        2    /* Incrementally loaded text */
  11. #define S_CSTACK    3    /* C-stack section */
  12. #define S_PLSTACK    4    /* Prolog-stack section */
  13.  
  14. #define RET_RETURN    1    /* save/1 */
  15. #define RET_MAIN    2    /* save_program/[1,2] */
  16.  
  17. #define SAVE_FAILURE    0    /* save() failed */
  18. #define SAVE_SAVE    1    /* save() successfully saved state */
  19. #define SAVE_RESTORE    2    /* save() success after restore() */
  20.  
  21. #define MAX_SAVE_SECTIONS 50    /* for machines without alloca() */
  22.  
  23. typedef void * caddr;        /* anonymous address */
  24.  
  25. typedef struct save_section
  26. { caddr    start;            /* Start address in memory */
  27.   long  length;            /* Length in bytes */
  28.   long  offset;            /* Offset in the file */
  29.   short type;            /* Which section is this? */
  30.   short    flags;            /* Various flags */
  31. } * SaveSection;
  32.  
  33. int    save(char *, char *, int, int, SaveSection);
  34. int    restore(char *, int (*allocf)(SaveSection));
  35.